<?php

$bugToVerify = $_POST['bugID'];

require_once('database2.php');

$query = 	"SELECT b.bugID,b.Priority,b.Description,e1.Name AS EName,p.projectName AS PName,b.DateAssigned,b.Status
				FROM BugMaster b
					INNER JOIN EmployeeMaster e1
						ON b.Assignee = e1.employeeID
					INNER JOIN ProjectMaster p
						ON b.projectID = p.projectID
						WHERE b.bugID='$bugToVerify'";		
						
$bugverifys = $db->query($query);		
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Bugsby Tracking</title>
<link href="stylesheets/group1Site.css" rel="stylesheet" type="text/css">
<link rel="icon" href="graphics/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="graphics/favicon.ico" type="image/x-icon">
<script src="scripts/jquery-1.7.1.js"></script>
<script src="scripts/imageSwap.js"></script>
</head>

<body>
<div id="wrapper">
<div id="banner"> <img src="graphics/banner1.png" height="90" width="730" alt="bugsby logo"> </div>
<div id="leftcolumn">
  <div id="nav">
    <ul>
      <li><a href="index.html"><img src="graphics/home.ico" border=0 height="36" width="36" alt="home icon">&nbsp;Home</a></li>
      <li><a href="buglist.php"><img src="graphics/Spider.ico" border=0 height="36" width="36" alt="bug list icon">&nbsp;Bug List</a></li>
      <li><a href="buginfo.html"><img src="graphics/info.png" border=0 height="36" width="36" alt="Info">&nbsp;Info</a></li>
      <li><a href="bugmail.html"><img src="graphics/Gmail.png" border=0 height="36" width="36" alt="feedback icon">&nbsp;Contact</a></li>
    </ul>
  </div>
  <!-- End Nav id --> 
</div>
<!-- End leftcolumn -->

<div id="content">
  <h1>Bugsby - Bug To Remove</h1>
  <p class="standardText">Below is the bug you selected for removal:</p>
  <table border="1">
    <tr>
      <th>ID</th>
      <th>Pri</th>
      <th>Bug Desc.</th>
      <th>Project</th>
      <th>Assignee</th>
      <th>Start</th>
      <th>Status</th>
    </tr>
    <?php foreach ($bugverifys as $bugverify) : ?>
    <tr>
      <td><?php echo $bugverify['bugID']; ?></td>
      <td><?php echo $bugverify['Priority']; ?></td>
      <td><?php echo $bugverify['Description']; ?></td>
      <td><?php echo $bugverify['PName']; ?></td>
      <td><?php echo $bugverify['EName']; ?></td>
      <td><?php echo $bugverify['DateAssigned']; ?></td>
      <td><?php echo $bugverify['Status']; ?></td>
    </tr>
    <?php endforeach; ?>
  </table>
  <br />
  <table>
    <tr>
      <td><form action="remove_bug.php" method="post">
          <input type="hidden" name="bugID" value="<?php echo $bugverify['bugID']; ?>" />
          <input type="image" SRC="graphics/trashempty.ico" width="48" height="48" ALT="Add Bug!" />
        </form></td>
      <td>&nbsp;
        &nbsp; </td>
      <td><form action="buglist.php" method="post" >
          <input type="image" SRC="graphics/Spider.ico" width="48" height="48" ALT="Add Bug!" />
        </form>
      <td>
    </tr>
    <tr>
      <td><p>Confirm Delete</p></td>
      <td>&nbsp;
        &nbsp; </td>
      <td><p>Return to Bug List</p></td>
    </tr>
  </table>
</div>
<hr>
<p>&nbsp;</p>
<div id="navGraphics">
<h2>Click on a Graphic to Choose an Option:</h2>
<table width="800" border="0">
  <tr>
    <td><a href="index.html"><img src="graphics/home.png" border=0 height="128" width="128" alt="homepage icon" rel="graphics/homeRed.png" class="rollover" /></a></td>
    <td><a href="buginfo.html"><img src="graphics/info.png" border=0 height="128" width="128" alt="information icon" rel="graphics/infoRed.png" class="rollover" /></a></td>
    <td><a href="bugmail.html"><img src="graphics/Gmail.png" border=0 height="128" width="128" alt="send email icon" rel="graphics/GmailRed.png" class="rollover" /></a></td>
  </tr>
  <tr>
    <td class="standardText">Bugsby Home</td>
    <td class="standardText">Information</td>
    <td class="standardText">Contact</td>
  </tr>
</table>
<table>
</div>
<p>&nbsp;</p>
<div id="footer"> Site Content: <a href="mailto:cs633group1@gmail.com">CS633 Group 1</a> </div>
<!-- End Footer -->
</div>
<!-- End Wrapper -->
</body>
</html>
